/* General Manager Without Form Starts */

function ManagerGeneral(url) 

{	

	
		var params ={
			'module': 'contact'

			};
		
		j('#TransMsgDisplay').html('<img src="images/indicator.gif" align="center">');	
		
		
		j.ajax({

				type: "POST",

				url: url,

				data: params,

				dataType: 'text',
				
				success: function(data){
				

						
						
						j('#records_listing').html(data);
			   				
				
						if(j('#TransMsgDisplay')) 
						{										
				
							j('#TransMsgDisplay').html('');
				
						}				           

				}

		});
		
       
}




function ManagerGeneral_old(url) 

{	

	var pars='';	

	$('TransMsgDisplay').innerHTML='<img src="images/indicator.gif" align="center">';	

	var myAjax = new Ajax.Request(

	url,

	{

		method: 'post',

		parameters: pars,

		onComplete: processManagerGeneral

	});

}









/* General Manager Without Form Ends */



/* General Manager With Form Starts */

function ManagerGeneralForm(url,formID) 

{	

	var frmID='#'+formID;
	var params ={

		'module': 'contact'


	};

	var paramsObj = j(frmID).serializeArray();

	
	j.each(paramsObj, function(i, field){

		params[field.name] = field.value;

	});




		
		j('#TransMsgDisplay').html('<img src="images/indicator.gif" align="center">');	
		
		j.ajax({

				type: "POST",

				url: url,

				data: params,

				dataType: 'text',
				
				success: function(data){
				
						j('#records_listing').html(data);
			   				
				
						if(j('#TransMsgDisplay')) 
				
						{										
				
							j('#TransMsgDisplay').html('');
				
						}				           

				}

		});














}









function ManagerGeneralForm_old(url,formID) 

{	

	var pars= Form.serialize(formID);	

	$('TransMsgDisplay').innerHTML='<img src="images/indicator.gif" align="center">';	

	var myAjax = new Ajax.Request(

	url,

	{

		method: 'post',

		parameters: pars,

		onComplete: processManagerGeneral

	});

}






/* General Manager With Form Ends */



/* Delete Function Starts */

function ConfirmDelete(url,delete_id,delete_name,delete_lebel_name,delete_category_id) 

{						
		j.prompt("Delete "+delete_lebel_name+" "+delete_name+" ?",{
		  callback: function(v,m,f){
			    if(v){
					
					
					


		url=url+"&delete_id="+delete_id+"&delete_category_id="+delete_category_id;	



		j('TransMsgDisplay').html('<img src="images/indicator.gif" align="center">');	

		
		var params ={
		'module': 'contact'

		};

		
		j.ajax({

				type: "POST",

				url: url,

				data: params,

				dataType: 'text',
				
				success: function(data){
				
						j('#records_listing').html(data);
			   				
				
						if(j('#TransMsgDisplay')) 
				
						{										
				
							j('#TransMsgDisplay').html('');
				
						}				           

				}

		});
		

						
					
					
					
					
					
					
					}
				else
					return false;
		  },
		  buttons:{Ok:true,Cancel:false},
		  prefix:'extblue'
	}); 
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	//if(confirm("Delete "+delete_lebel_name+" "+delete_name+" ?")) 

	//{//
//
//		url=url+"&delete_id="+delete_id+"&delete_category_id="+delete_category_id;	
//
//
//
//		j('TransMsgDisplay').html('<img src="images/indicator.gif" align="center">');	
//
//		
//		var params ={
//		'module': 'contact'
//
//		};
//
//		
//		j.ajax({
//
//				type: "POST",
//
//				url: url,
//
//				data: params,
//
//				dataType: 'text',
//				
//				success: function(data){
//				
//						j('#records_listing').html(data);
//			   				
//				
//						if(j('#TransMsgDisplay')) 
//				
//						{										
//				
//							j('#TransMsgDisplay').html('');
//				
//						}				           
//
//				}
//
//		});
//		
//
//	}		

}

function ConfirmReplyDelete(url,delete_id,delete_name,delete_lebel_name,delete_category_id) 
{
		j.prompt("Delete "+delete_lebel_name+" "+delete_name+" ?",{
		callback: function(v,m,f){
		if(v)
		{			
		url=url+"&delete_id="+delete_id+"&delete_category_id="+delete_category_id;	
		j('TransMsgDisplay').html('<img src="images/indicator.gif" align="center">');	
		
		var params ={
		'module': 'contact'
		};

		j.ajax({

				type: "POST",

				url: url,

				data: params,

				dataType: 'text',
				
				success: function(data){
						
						j('#records_listing').html(data);
			   				
						if(j('#TransMsgDisplay')) 
						{										
							j('#TransMsgDisplay').html('');
						}				           
				}
		});
		}
		else
			return false;
	 	},
		  buttons:{Ok:true,Cancel:false},
		  prefix:'extblue'
	}); 
}

function ConfirmDelete_old(url,delete_id,delete_name,delete_lebel_name,delete_category_id) 

{						

	if(confirm("Delete "+delete_lebel_name+" "+delete_name+" ?")) 

	{

		pars=url+"&delete_id="+delete_id+"&delete_category_id="+delete_category_id;	

		//alert(pars);

		$('TransMsgDisplay').innerHTML='<img src="images/indicator.gif" align="center">';	

		var myAjax = new Ajax.Request(

		url,

		{

		method: 'post',

		parameters: pars,

		onComplete: processManagerGeneral

		});		

	}		

}












/* Delete Function Ends */



function ConfirmDeleteInactive(url,delete_lebel_name) 

{						

	if(confirm("Delete "+delete_lebel_name+" ?")) 

	{

		j('TransMsgDisplay').html('<img src="images/indicator.gif" align="center">');	

		
		var params ={
		'module': 'contact'

		};

		
		j.ajax({

				type: "POST",

				url: url,

				data: params,

				dataType: 'text',
				
				success: function(data){
				
						j('#records_listing').html(data);
			   				
				
						if(j('#TransMsgDisplay')) 
				
						{										
				
							j('#TransMsgDisplay').html('');
				
						}				           

				}

		});
		
		

	}		

}







function ConfirmDeleteInactive_old(url,delete_lebel_name) 

{						

	if(confirm("Delete "+delete_lebel_name+" ?")) 

	{

		pars=url;	

		//alert(pars);

		$('TransMsgDisplay').innerHTML='<img src="images/indicator.gif" align="center">';	

		var myAjax = new Ajax.Request(

		url,

		{

		method: 'post',

		parameters: pars,

		onComplete: processManagerGeneral

		});		

	}		

}







/* onComplete Function Starts */

function processManagerGeneral(originalRequest) 

{		

       var responseTextTrim=trim(originalRequest.responseText);

				   				   

		$('records_listing').innerHTML=responseTextTrim;				   				

		if($('TransMsgDisplay')) 

		{										

			$('TransMsgDisplay').innerHTML = "";

		}				           

}

/* onComplete Function Ends */ 



/* Special Sections Starts */

function GetSpecialBlock(special_id,special_item_id) 

{		

	var url = "home_section_special_block.php";

	var pars="special_id="+special_id+"&special_item_id="+special_item_id;	

	var myAjax = new Ajax.Request(

	url,

	{

		method: 'post',

		parameters: pars,

		onComplete: processGetSpecialBlock

	});

}

	

function processGetSpecialBlock(originalRequest) 

{	

	$('div_special').innerHTML = trim(originalRequest.responseText);



 }

/* Special Sections Ends */

 